<?php

class Idioma extends Controller {

	public function __construct()
	{
		parent::__construct();
	}
	
	public function index()	{
    redirect('', 'location');
	}

  public function change($idioma,$jumpToLevel1="",$jumpToLevel2="",$jumpToLevel3="") {
    $this->prunuslib->setCurrentAction($this->config->item('PR_accion_MyUser_ChangeIdioma'));
    $this->prunuslib->setCurrentMenuItem($this->config->item('PR_menuItem_MyUser'));
    $this->prunuslib->switchIdioma($idioma);
    if ($jumpToLevel1!="") {
      $jumpTo = $jumpToLevel1;
      if ($jumpToLevel2!="") {
        $jumpTo .= "/" . $jumpToLevel2;
        if ($jumpToLevel3!="") $jumpTo .= "/" . $jumpToLevel3;
      }
      redirect($jumpTo, 'location', 301);
    } else {
      redirect('', 'location', 301);
    }
  }
  
}

/* End of file idioma.php */
/* Location: ./system/application/controllers/idioma.php */